package com.middlegroup.payadmin.controller.sys;

import com.github.pagehelper.PageInfo;
import com.middlegroup.payadmin.controller.BaseController;
import com.middlegroup.payadmin.pojo.dto.DataGrid;
import com.middlegroup.payadmin.pojo.po.RefundBills;
import com.middlegroup.payadmin.service.RefundBillsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 *
 * @author pc
 * @date 2019/1/22
 */
@Controller
@RequestMapping("/sys/refundBills")
@Api(value = "退款管理", description = "退款管理", tags = "1.2")
@Valid
public class RefundBillsController extends BaseController {

    @Resource
    private RefundBillsService refundBillsService;
    @Resource
    private RedisTemplate redisCacheTemplate;


    @ApiIgnore
    @GetMapping("/list")
    public String list() {
        return "sys/refundBills/list";
    }


    @ApiOperation(value = "带条件分页查询商户列表")
    @GetMapping(value = "/query")
    @ResponseBody
    public PageInfo<RefundBills> query(DataGrid grid, RefundBills refundBills) {
        return refundBillsService.getRefundBillsList(grid,refundBills);
    }


}
